#!\bin\bash

# O executavel, é gerado na pasta bin/
gcc -o main main.c -fopenmp src/genmtrand.c src/rw_functions.c src/rw_png.c -lm -lpng -std=c99 -O3 -Wall


for i in $(seq 1 10)
do
   ./main 1 1024 2048 "$i" 1 >> atomic/saida_1024_2048_OpenMP_1T_Zeus_atomic
done

for i in $(seq 1 10)
do
   ./main 1 1024 2048 "$i" 2 >> atomic/saida_1024_2048_OpenMP_2T_Zeus_atomic
done

for i in $(seq 1 10)
do
   ./main 1 1024 2048 "$i" 4 >> atomic/saida_1024_2048_OpenMP_4T_Zeus_atomic
done


for i in $(seq 1 10)
do
   ./main 1 2048 4096 "$i" 1 >> atomic/saida_2048_4096_OpenMP_1T_Zeus_atomic
done

for i in $(seq 1 10)
do
   ./main 1 2048 4096 "$i" 2 >> atomic/saida_2048_4096_OpenMP_2T_Zeus_atomic
done

for i in $(seq 1 10)
do
   ./main 1 2048 4096 "$i" 4 >> atomic/saida_2048_4096_OpenMP_4T_Zeus_atomic
done



for i in $(seq 1 10)
do
   ./main 1 4096 8192 "$i" 1 >> atomic/saida_4096_8192_OpenMP_1T_Zeus_atomic
done

for i in $(seq 1 10)
do
   ./main 1 4096 8192 "$i" 2 >> atomic/saida_4096_8192_OpenMP_2T_Zeus_atomic
done

for i in $(seq 1 10)
do
   ./main 1 4096 8192 "$i" 4 >> atomic/saida_4096_8192_OpenMP_4T_Zeus_atomic
done

#for i in $(seq 1 10)
#do
#   ./main 2 2048 4096 "$i" 1 >> saida_2048_1T
#done

#for i in $(seq 1 10)
#do
#   ./main 2 2048 4096 "$i" 2 >> saida_2048_2T
#done

#for i in $(seq 1 10)
#do
#   ./main 2 2048 4096 "$i" 4 >> saida_2048_4T
#done


#for i in $(seq 1 2)
#do
#   ./main 1 16 16 "0$i" 4 
#done

#for i in $(seq 1 2)
#do
#   ./main 2 16 16 "0$i" 4 
#done

#for i in $(seq 1 5)
#do
#   ./main 0 4096 8192 "$i" 
#	time ./main "arquivo $i" 1000 $(($PARTICULAS * $i))
	
#	printf "__________________________\n"
	
#done

# gcc -o main main.c include/rw_function_serial.h include/mtSerial.h -fopenmp src/mtSerial.c src/rw_function_serial.c include/mersenneTwister.h include/mersenneTwisterCPU.h include/dci.h src/genmtrand.c include/rw_function_openmp_atomic.h src/rw_function_openmp_atomic.c include/rw_png.h src/rw_png.c -fopenmp -lm -lpng -std=c99
